{%extends "base.html"%}
{%block title%}
修改密码 - 马克笔记
{%endblock title%}
{%block styles%}

<link rel="stylesheet" href="{{url_for("static", filename="dist/css/setting.min.css")}}">

{{super()}}
{%endblock styles%}

{%block content%}

<div class="main-dropdown">
    <div class="container">
        <div class="main-left">
            {%include "setting/_main-left.html"%}
        </div>
        <div class="main-center">
                <div class="setting-form">
                    <div class="setting-header">
                        <h3>修改密码</h3>
                    </div>
                    <form class="form-horizontal" method="post" role="form">
                        {{ form.hidden_tag() }}
                        <div class="setting-group">
                            {%for msg in get_flashed_messages()%}
                            {%if loop.first%}
                            <div class="alert alert-success alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                {{msg.decode("utf-8")}}
                            </div>
                            {%endif%}
                            {%endfor%}
 
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="old_password">目前密码</label>
                                <div class="col-sm-9">
                                    <input type="password" class="form-control {%if form.old_password.errors%}input-error{%endif%}" name="old_password" >
                                    {%for error in form.old_password.errors%}
                                    <div class="input-error-info">{{error.decode("utf-8")}}</div>
                                    {%endfor%}
                                    <a  href="{{url_for("home.password_forgot")}}" style="display:inline-block; margin-top:5px;font-size:13px;">忘记密码?</a>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="password">新密码</label>
                                <div class="col-sm-9">
                                    <input type="password" class="form-control {%if form.password.errors%}input-error{%endif%}" name="password">
                                    {%for error in form.password.errors%}
                                    <div class="input-error-info">{{error.decode("utf-8")}}</div>
                                    {%endfor%}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="repeat_password">确认密码</label>
                                <div class="col-sm-9">
                                    <input type="password" class="form-control {%if form.repeat_password.errors%}input-error{%endif%}" name="repeat_password">
                                    {%for error in form.repeat_password.errors%}
                                    <div class="input-error-info">{{error.decode("utf-8")}}</div>
                                    {%endfor%}
                                </div>
                            </div>
                        </div>
                        <div class="setting-bottom">
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-9">
                                    <button type="submit" class="btn btn-default">保存更改</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
        </div>
    </div>
</div>


{%endblock content%}

{%block scripts%}

<script src="{{url_for("static", filename="dist/js/common.min.js")}}"></script>

{{super()}}
{%endblock scripts%}
  


